package stringexercise;

public class StringBuilderDemo {
    public static void main(String[] args) {
        String str = "我爱Java";
        StringBuilder builder = new StringBuilder(str);

        builder.append("，好好学习找工作");
        System.out.println(builder);
        builder.delete(0,7);
        System.out.println(builder);
        builder.replace(2,4,"活着");
        System.out.println(builder);
        builder.insert(0,"人");
        System.out.println(builder);
    }
}
